{extend name="layout/base" /}
{block name="main"}
<div class="news">
    <div class="container">
        <div class="index-title txt-c">
            <em>你的梦想我很在意 更支持</em>
            <div class="line">
                <h3>酒店客房</h3>
            </div>
        </div>
        <div class="news-list c">
            <ul>
                <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#00FFFF"
                       style="border-collapse:collapse" class="">
                    <tr>
                        <td rowspan=7 align=center><img
                                src="{$room.image}" width=500 height=375
                                border=0></a></td>
                        <td width='11%' height=30 style="font-weight: bolder">房型：</td>
                        <td width='39%'>{$room.name}</td>

                    </tr>
                    <tr>

                        <td width='11%' height=30 style="font-weight: bolder">可入住人数：</td>
                        <td width='39%'>{$room.people_count}</td>
                    </tr>
                    <tr>

                        <td width='11%' height=30 style="font-weight: bolder">床型：</td>
                        <td width='39%'>{$room.bed}</td>
                    </tr>
                    <tr>
                        <td width='11%' height=30 style="font-weight: bolder">价格：</td>
                        <td width='39%'>{$room.price}</td>
                    </tr>
                    <tr>
                        <td width='11%' height=80 style="font-weight: bolder">房间设施：</td>
                        <td width='39%' colspan=2
                            height=100>{$room.room_facilities}
                        </td>
                    </tr>
                    <tr>
                        <td width='11%' height=80 style="font-weight: bolder">其他服务：</td>
                        <td width='39%' colspan=2 height=100>{$room.other_service}</td>
                    </tr>
                    <tr>
                        <td width='11%' height=80 style="font-weight: bolder">房间展示：</td>
                        <td width='39%' colspan=2
                            height=100>{$room.room_display}
                        </td>
                    </tr>
                    <tr>
                        <td colspan=3 align=center>
                            <table width="100%" border="1" align="center" cellpadding="3" cellspacing="1"
                                   bordercolor="#00FFFF" style="border-collapse:collapse">
                                <tr>
                                    <td width="50" bgcolor="#D8E8F8">序号</td>
                                    <td width="323" align="left" bgcolor='#D8E8F8'>评论内容</td>
                                    <td width="98" align="left" bgcolor='#D8E8F8'>评论人</td>
                                    <td width="106" align="center" bgcolor="#D8E8F8">评分</td>
                                    <td width="106" align="center" bgcolor="#D8E8F8">评论时间</td>
                                </tr>
                                {foreach $commentList as $index => $comment}
                                <tr>
                                    <td width="50">{$index+1}</td>
                                    <td align="left">{$comment.content}</td>
                                    <td align="left">{$comment.username}</td>
                                    <td width="106"
                                        align="center">{$comment.score}
                                    </td>
                                    <td width="106"
                                        align="center">{$comment.create_time}
                                    </td>
                                </tr>
                                {/foreach}
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan=3 align=center><input type=button name=Submit5 value=返回
                                                          onClick="javascript:history.back()"
                                                          class='hsgqiehuanshitu'/>
                            {if session('user.username') != ''}
                            <input type=button name=Submit53 class='hsgqiehuanshitu' value=客房预订
                                   onClick="javascript:location.href='reserve?id={$room.id}';"/>
                            <input type=button name=Submit53 value=评论
                                   onClick="javascript:OpenScript('/comment?id={$room.id}',1000,600)"
                                   class='hsgqiehuanshitu'/>
                            {/if}
                        </td>
                    </tr>
                </table>
            </ul>
        </div>
    </div>
</div>

<script language="javascript">
    function OpenScript(url, width, height) {
        var win = window.open(url, "SelectToSort", 'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes');
    }

    function OpenDialog(sURL, iWidth, iHeight) {
        var oDialog = window.open(sURL, "_EditorDialog", "width=" + iWidth.toString() + ",height=" + iHeight.toString() + ",resizable=no,left=0,top=0,scrollbars=no,status=no,titlebar=no,toolbar=no,menubar=no,location=no");
        oDialog.focus();
    }
</script>
{/block}
